#include <stdio.h>
#include <math.h>

// 注：题目中的对角线是AC

double getArea(double lenAB, double lenBC, double lenCD, double lenDA, double lenAC){
    double halfABC = (lenAB + lenBC + lenAC) / 2;
    double halfADC = (lenCD + lenDA + lenAC) / 2;
    double areaABC = sqrt(halfABC * (halfABC - lenAB) * (halfABC - lenBC) * (halfABC - lenAC));
    double areaADC = sqrt(halfADC * (halfADC - lenCD) * (halfADC - lenDA) * (halfADC - lenAC));
    // 海伦公式
    return areaABC + areaADC;
}

double getAngle(double lenAB, double lenBC, double lenCD, double lenDA, double lenAC, double area){
    // 面积法：当AC与BD交于E，则总面积为AEB，BEC，AED，CED之和
    // 根据数学公式计算，总面积为AC * BD * sin(angle) * 1/2
    // 先计算BD的长
    /*
    double angleACB = acos((pow(lenBC, 2) + pow(lenAC, 2) - pow(lenAB, 2)) / (2 * lenBC * lenAC));
    double angleACD = acos((pow(lenCD, 2) + pow(lenAC, 2) - pow(lenDA, 2)) / (2 * lenCD * lenAC));
    double angleBCD = angleACB + angleACD;
    double lenBD = sqrt(pow(lenBC, 2) + pow(lenCD, 2) - (2 * lenBC * lenCD * cos(angleBCD)));
    double angle = asin((2 * area / (lenAC * lenBD) >= 1) ? 1 : 2 * area / (lenAC * lenBD));
    return angle / PI * 180.0;
    */
    // 我压根不知道我的算法为什么过不了，先复制一个别人的算法在这里，之后我再解释为什么它是成立的
    // 参考对象：https://blog.csdn.net/annesede/article/details/133761873
    double angle = (4 * area) / (pow(lenBC, 2) + pow(lenDA, 2) - pow(lenAB, 2) - pow(lenCD, 2));
    return atan(angle) * 180.0 / acos(-1);
}

int main(){
    double lenAB, lenBC, lenCD, lenDA, lenAC;
    scanf("%lf%lf%lf%lf%lf", &lenAB, &lenBC, &lenCD, &lenDA, &lenAC);
    double area = getArea(lenAB, lenBC, lenCD, lenDA, lenAC);
    double angle = getAngle(lenAB, lenBC, lenCD, lenDA, lenAC, area);
    printf("%.6lf %.1lf", area, angle);
    return 0;
}